/*
  Programa Wifis, 2010-2011
  Autor: Nilhcraiv

This file is part of Wifis.

    Wifis is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Wifis is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Wifis.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QStandardItemModel>
#include <QProgressDialog>
#include <QString>
#include <QVector>
#include <QTimer>

#include "windowsos.h"
#include "linuxos.h"
#include "updatesThread.h"
#include "save.h"
#include "options.h"
#include "displayinformation.h"
#include "dialogo.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    bool maximized();//Return true if the aplication shall be show maximized or false if no.

private:

#if defined (__WIN32__)
    windowsos *OS;
#endif

#if defined(__linux__)
    linuxos *OS;
#endif

#if defined( __APPLE_CC__)
    //Class for apple OS
#endif

    Ui::MainWindow *ui;

    QStandardItemModel *model;
    QTimer *timer;
    save *classSave;
    QProgressDialog *dialog;
    displayInformation *display;
    updatesThread *updates;
    Dialogo *dialogo;
    options *opciones;

    QVector <QString> vectorNetWorks;
    QVector <int> config;
    double version;
    bool showMaximizedWindow;
    bool inicio; //La utilizo para indicar a slotUpdates que no debe mostrar información inecesaria al iniciar la aplicación,
    //es decir, si al inicio de la aplicación se comprueban actualizaciones y no hay, no debe mostrar al usuario nada.

private slots:
    void detectNetworks();
    void acercaDe();
    void slotCheckUpdates();
    void saveNetworks();
    void slotOptions();
    void slotConectarButton();
    void blockSignalsQTimer(bool block);
    void slotAyuda();
    void slotSort(int d);
};

#endif // MAINWINDOW_H
